package org.llama.jmex.terra;

import com.jme.math.Vector3f;


/*
 * Terradata represents the composition for complex map;
 * It is intended this holds the world data along with any texturing 
 * information needed. 
 * This also represeents the MapObject held within the MapStore per
 * the XYey. 
 * 
 */

public abstract class TerraData {
	
	/*
	 * totalSize is the size of this data
	 */
	protected int totalSize;
	protected Vector3f stepScale;
	
	public int xx, yy;
	protected int numtex;
	
	/*
	 * xy is the map key
	 */
	public XYKey xy;
	Vector3f origin;
	public int blocksize, upperx, uppery;
	public boolean deleted = false;
			
	TerraManager terraManager;

	/*
	 * gets the associated TerraMesh
	 */
	public abstract TerraMesh getTerraMesh();
	
	/*
	 * Build standard normals, vertcies, texrture coordinates etc
	 */
	public abstract void updateTerra();
	
	public abstract TerraMesh createTerraMesh();
	
	public abstract void updateMesh();

	public int getBlockSize() {
		return blocksize;
	}
	/**
	 * Returns the step scale that stretches the height map.
	 * 
	 * @return The current step scale.
	 */
	public Vector3f getStepScale() {
		return stepScale;
	}
	/**
	 * Returns the total size of the terra block.
	 * 
	 * @return The terra's total size.
	 */
	public int getTotalSize() {
		return totalSize;
	}
	
	public abstract void cleanUp();
}
